SPOJ
What is SPOJ? Sphere Online Judge (SPOJ) is an online judge system used by UF Programming Team to practice solving problems. It contains over 20,000 problems, which use a wide variety of algorithms and data structures, and range from very easy to extremely difficult. Most problems that are given during meetings will come from SPOJ, so having an account and being able to submit your solution is important to know. Registering for a SPOJ account In order to submit a problem on SPOJ, you must be registered for the site. To register, click here and following the instructions that follow. 'Problems' Problems on SPOJ are broken up into five categories: classical, challenge, partial, tutorial, riddle. 'Classical' The main type of problem on SPOJ; these problems count towards your rank and show up on the list of problems you have solved, which can be found here (but you must be signed in). Classical problems test your knowledge of algorithms and data structures, and are the main type of problems we will be using during meetings. 'Challenge' These problems (usually) have no definite answer; they involve getting points for a number of test cases you get write, using the shortest amount of code to solve the problem, etc. These are problems that you would see in fun contests. 'Partial' These are very similar to challenge problems, but usually involve more algorithms. 'Tutorial' These are like classical problems, but much easier; these problems don't count against your rank or show up in the list of problems you have solved. These are useful when trying to get the basic concept of an algorithm down before moving on to an application problem. 'Riddle' These are problems that contain puzzles; they require you to think outside the box and be creative. 'Judging' When submitting a solution to a problem on SPOJ, you will be given one of the following messages from the judge: 'Accepted (AC)' The ideal result: your code compiled, read in all of the input properly, used the correct algorithm and/or data structure, gave the correct output for every single test case used by the judge, ran in the amount of time given, and executed without throwing an exception anywhere. 'Wrong Answer (WA)' The output that your program produced is different from the expected output from the judge: 'your algorithm did not process all of the test cases correctly, you didn't print everything that was requested by the problem setter, etc. 'Time Limit Exceeded (TLE) Your program was unable to process all of the judge's input in the given time: your algorithm is incorrect and not processing the data in the correct runtime, there is an infinite loop in your code that is causing the program to never stop, etc. 'Runtime Error (NZEC/SIGSEGV)' Your program threw an exception while running: common exceptions include memory limit exceeded, ArrayIndexOutOfBoundsException (trying to access an element in an array that is past the given bounds), NullPointerException (trying to operate with an object that has not been declared), etc. 'What now?' Now that you have created an account on SPOJ and understand the judging process, click on the following link to learn how to handle input and output on SPOJ, and solve your first problem: Solving your first problem